<!DOCTYPE html PUBLIC "-//W3C//Dth XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/Dth/xhtml1-transitional.dth">
<!--#include file="DataLoad.asp"-->

<html>
<head>
<title><%=GuildName%> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="DKP WOW GUILD">
<meta name="Description" content="">
<link href="<%=StylePath%>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<%=StylePath%>/styleplus.js"></script>
<style type="text/css" media="all">

</style>
<!--#include file="inc/ajax.asp"-->
</head>


<%if CheckAdmin() and request("action")="killed" then call dbKilledMark(request("id"))%>
<%if CheckAdmin() and request("action")="unkilled" then call dbUnKilledMark(request("id"))%>

<%if CheckAdmin() and request("action")="delkilled" then call dbDelKilledMark(request("sn"))%>
<%if CheckAdmin() and request("action")="addkilled" then call dbAddKilledMark(request("sn"))%>

<body>
<div class="header">
<!--#include file="menu.asp"-->
</div>
<div class="main">

<div class="timeChart outframe">
	<h3>Wotlk首领进度</h3>
<%
Dim strKilledSNList
SQL = "select * from Instance where killed = True"
rs.open sql,conn,1,1
	For kindex = 1 To rs.recordcount
		strKilledSNList = strKilledSNList&","&rs("SN")
	rs.movenext
	Next 
	'response.write strKilledSNList
rs.close

For Iindex = 0 To UBound(iInstance,1)
	If IsArray(iInstance(Iindex)) Then
		Response.write "	<h4>"&iInstance(Iindex)(langcode)&"</h4>"
		For Bindex = 0 To UBound(iBoss,2)
			If IsArray(iBoss(Iindex,Bindex)) Then
				If CheckAdmin() Then
					If InStr(strKilledSNList&",",","&Iindex&Bindex&",") <> 0 Then
					Response.write "<div class='boss'><img src='images/Boss/"&iBoss(Iindex,Bindex)(3)&".gif' alt='' /><b>"&iBoss(Iindex,Bindex)(langcode)&"</b><span><a href='?action=delkilled&amp;sn="&iBoss(Iindex,Bindex)(3)&"'>撤销</a></span></div>"
					else
					Response.write "<div class='boss unkilled'><img src='images/Boss/"&iBoss(Iindex,Bindex)(3)&".gif' alt='' /><b>"&iBoss(Iindex,Bindex)(langcode)&"</b><span><a href='?action=addkilled&amp;sn="&iBoss(Iindex,Bindex)(3)&"'>击杀</a></span></div>"
					End If
				Else
					If InStr(strKilledSNList&",",","&Iindex&Bindex&",") <> 0 Then
					Response.write "<div class='boss'><img src='images/Boss/"&iBoss(Iindex,Bindex)(3)&".gif' alt='' /><b>"&iBoss(Iindex,Bindex)(langcode)&"</b></div>"
					else
					Response.write "<div class='boss unkilled'><img src='images/Boss/"&iBoss(Iindex,Bindex)(3)&".gif' alt='' /><b>"&iBoss(Iindex,Bindex)(langcode)&"</b></div>"
					End If
				End If
			End If
		Next
	End If
Next
%>
</div>

</div>
<div id="footer"><!--#include file="footer.asp"--></div>
</body>
</html>

<%

Function dbAddKilledMark(SN)
	conn.execute("INSERT INTO Instance (killed,SN) Values (True,"&SN&")")
End FUnction

Function dbDelKilledMark(sn)
	conn.execute("Delete * from Instance where SN="&sn)
End FUnction

%>